/*******************************************************************************
 * CBUneItemView.h
 * ComicsBlog
 *
 * Adrien Bougouin <adrien.bougouin@gmail.com>
 */

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import "../model/CBNews.h"

#define CBUneLabelBackgroundUSelImage @"une_label_background_unselected.png"
#define CBUneLabelBackgroundSelImage  @"une_label_background_selected.png"
#define CBUneLoadingImage             @"loading_une.png"

@interface CBUneItemView : UIControl {
  @private
    NSUInteger _index;
    UIImageView *_imageView;
    NSURLConnection *_imageConnection;
    NSMutableData *_imageData;
}

@property(nonatomic, assign, getter=index, setter=setIndex) NSUInteger _index;

- (id) initWithFrame:(CGRect) frame
                news:(CBNews *) news
               index:(NSUInteger) index;
- (void) loadImageFromString:(NSString *) string;

@end

